#ifndef _KMP_H_
#define _KMP_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define KMP
#define NEXTLOC_TEST

#define MALLOC(pointer, size, type)                      \
    type *pointer = (type *)malloc(sizeof(type) * size); \
    if (pointer == NULL)                                 \
        exit(1);                                         \
    memset(pointer, 0, sizeof(type) * size);

typedef int bool;
typedef int RESULT;
RESULT contain(const char *str, const char *key);
int *nextLocs(const char *str);

#endif